function MakeLoans(){
	var ocoupon=document.eSecondProfiles.ecoup.value;
	var oprovince=document.eSecondProfiles.eppp.value;
	var ovisit=document.eSecondProfiles.evisit.value;
	var userInput = document.eSecondProfiles.eloanborrow.value;
	var osign=document.eSecondProfiles.esignoff.value;
	var bankname=document.eSecondProfiles.ebankname.value;

if (oprovince=="Alberta")
{var ocost=0.23*ocoupon;
}
else if (oprovince=="Ontario")
{var ocost=0.21*ocoupon;
}
else
{var ocost=0.21*ocoupon;
}

if(ovisit<=2){
	$("#loan0").show();
	$("#loan1").hide();
	$("#loan2").hide();
	$("#loan2a").hide();
	$("#loan3").hide();
	$("#loan3a").hide();
	$("#loan4").hide();
	$("#loan4a").hide();
	$("#loan5").hide();
	$("#loan5a").hide();
	$("#loan6").hide();
	var eloanamount = $("#loan0").val();
	var amount = $("#loan0").val() * ocost;

}
else if(ovisit>2 && ovisit<=6){
	$("#loan0").hide();
	$("#loan1").show();
	$("#loan2").hide();
	$("#loan2a").hide();
	$("#loan3").hide();
	$("#loan3a").hide();
	$("#loan4").hide();
	$("#loan4a").hide();
	$("#loan5").hide();
	$("#loan5a").hide();
	$("#loan6").hide();
	var eloanamount = $("#loan1").val();
	var amount = $("#loan1").val() * ocost;

}
else if(ovisit>6 && ovisit<=10){
	$("#loan0").hide();
	$("#loan1").hide();
	$("#loan2").show();
	$("#loan2a").hide();
	$("#loan3").hide();
	$("#loan3a").hide();
	$("#loan4").hide();
	$("#loan4a").hide();
	$("#loan5").hide();
	$("#loan5a").hide();
	$("#loan6").hide();
	var eloanamount = $("#loan2").val();
	var amount = $("#loan2").val() * ocost;

}
else if(ovisit>10 && ovisit<=15){
	$("#loan0").hide();
	$("#loan1").hide();
	$("#loan2").hide();
	$("#loan2a").show();
	$("#loan3").hide();
	$("#loan3a").hide();
	$("#loan4").hide();
	$("#loan4a").hide();
	$("#loan5").hide();
	$("#loan5a").hide();
	$("#loan6").hide();
	var eloanamount = $("#loan2a").val();
	var amount = $("#loan2a").val() * ocost;

}
else if(ovisit>15 && ovisit<=20){
	$("#loan0").hide();
	$("#loan1").hide();
	$("#loan2").hide();
	$("#loan2a").hide();
	$("#loan3").show();
	$("#loan3a").hide();
	$("#loan4").hide();
	$("#loan4a").hide();
	$("#loan5").hide();
	$("#loan5a").hide();
	$("#loan6").hide();
	var eloanamount = $("#loan3").val();
	var amount = $("#loan3").val() * ocost;

}
else if(ovisit>20 && ovisit<=25){
	$("#loan0").hide();
	$("#loan1").hide();
	$("#loan2").hide();
	$("#loan2a").hide();
	$("#loan3").hide();
	$("#loan3a").show();
	$("#loan4").hide();
	$("#loan4a").hide();
	$("#loan5").hide();
	$("#loan5a").hide();
	$("#loan6").hide();
	var eloanamount = $("#loan3a").val();
	var amount = $("#loan3a").val() * ocost;

}
else if(ovisit>25 && ovisit<=30){
	$("#loan0").hide();
	$("#loan1").hide();
	$("#loan2").hide();
	$("#loan2a").hide();
	$("#loan3").hide();
	$("#loan3a").hide();
	$("#loan4").show();
	$("#loan4a").hide();
	$("#loan5").hide();
	$("#loan5a").hide();
	$("#loan6").hide();
	var eloanamount = $("#loan4").val();
	var amount = $("#loan4").val() * ocost;

}
else if(ovisit>31 && ovisit<=35){
	$("#loan0").hide();
	$("#loan1").hide();
	$("#loan2").hide();
	$("#loan2a").hide();
	$("#loan3").hide();
	$("#loan3a").hide();
	$("#loan4").hide();
	$("#loan4a").show();
	$("#loan5").hide();
	$("#loan5a").hide();
	$("#loan6").hide();
	var eloanamount = $("#loan4a").val();
	var amount = $("#loan4a").val() * ocost;

}
else if(ovisit>35 && ovisit<=40){
	$("#loan0").hide();
	$("#loan1").hide();
	$("#loan2").hide();
	$("#loan2a").hide();
	$("#loan3").hide();
	$("#loan3a").hide();
	$("#loan4").hide();
	$("#loan4a").hide();
	$("#loan5").show();
	$("#loan5a").hide();
	$("#loan6").hide();
	var eloanamount = $("#loan5").val();
	var amount = $("#loan5").val() * ocost;

}
else if(ovisit>40 && ovisit<=45){
	$("#loan0").hide();
	$("#loan1").hide();
	$("#loan2").hide();
	$("#loan2a").hide();
	$("#loan3").hide();
	$("#loan3a").hide();
	$("#loan4").hide();
	$("#loan4a").hide();
	$("#loan5").hide();
	$("#loan5a").show();
	$("#loan6").hide();
	var eloanamount = $("#loan5a").val();
	var amount = $("#loan5a").val() * ocost;

}
else if(ovisit>=46){
	$("#loan0").hide();
	$("#loan1").hide();
	$("#loan2").hide();
	$("#loan2a").hide();
	$("#loan3").hide();
	$("#loan3a").hide();
	$("#loan4").hide();
	$("#loan4a").hide();
	$("#loan5").hide();
	$("#loan5a").hide();
	$("#loan6").show();
	var eloanamount = $("#loan6").val();
	var amount = $("#loan6").val() * ocost;
}

if (bankname=="NonBank"){
$("#otherbanking").show();}
else
{$("#otherbanking").hide();}

	document.eSecondProfiles.eloancost.value = "$"+amount.toFixed(2);
	if (amount==0){
	document.eSecondProfiles.eloan.value = "";}
	else{document.eSecondProfiles.eloan.value = eloanamount;}
	document.eSecondProfiles.esing.value =osign;

}
